package  recycleTest
{
	import asunit.core.TextCore;
	import com.greensock.TweenLite;
	import flash.display.DisplayObject;
	import flash.display.Loader;
	import flash.display.MovieClip;
	import flash.display.Shape;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.system.ApplicationDomain;
	import flash.utils.ByteArray;
	import flash.utils.getDefinitionByName;
	import org.osflash.signals.natives.NativeSignal;
	import org.osflash.signals.Signal;
	import util.boyaa.MCUtil;
	
	
	
	[SWF(width = '1000', height = '800', backgroundColor = '#333333', frameRate = '31')]
	/**
	 * ...
	 * @author henrylee   Any question, pls contact me. henrylee_sz@qq.com.
	 */
	public class RecycleTestMain extends MovieClip
	{
		[Embed(source="raw/Monster_1.swf", symbol="Monster_1")]
		public static var MonsterAni:Class;
		
		private var loader:Loader;
		
		private var core:TextCore;
		
		public function RecycleTestMain() 
		{
			core = new TextCore();
			core.textPrinter.hideLocalPaths = true;
			core.start(RecycleTestList, null, this);
			//
			//var single: NativeSignal = new NativeSignal(this, MouseEvent.CLICK, MouseEvent);
			//single.addOnce(function(e:MouseEvent):void { trace('onClicked!') } );
			//
			//var _signal: Signal = new Signal(String, int);
			//_signal.addOnce(signalTest);
			//_signal.dispatch('Alert', 9);
			
			//var mc_p: MovieClip = new MovieClip();
			//
			//var mc: MovieClip = (new MonsterAni()) as MovieClip;
			//mc.x = 100;
			//mc.y = 100;
			//mc_p.addChild(mc);
			//stage.addChild(mc_p);
			//MCUtil.stopAni(mc_p);
			//
			//TweenLite.delayedCall(3.0, function():void {
					//MCUtil.playAni(mc_p);
				//});
			//
			//TweenLite.delayedCall(5.0, function():void {
					//MCUtil.stopAni(mc_p);
				//});
				//
			//TweenLite.delayedCall(7.0, function():void {
					//MCUtil.playAni(mc_p);
				//});
				//
			//TweenLite.delayedCall(10.0, function():void {
					//MCUtil.removeAllChild(mc_p);
				//});
		}
		
		private function onLoadComplete(e:Event):void 
		{
			e.currentTarget.removeEventListener(e.type, arguments.callee);
			trace(ApplicationDomain.currentDomain.hasDefinition("Monster_1"));
		}
		
		private function signalTest(msg: String, num: int):void 
		{
			trace(msg, num);
		}
		
		
	}

}